#ifndef BEHAVIOR_TREE_WHILE_DO_POLICY_H
#define BEHAVIOR_TREE_WHILE_DO_POLICY_H

#include "behavior_tree_policy.h"
namespace policy
{
class BehaviorTreeWhileDoPolicy: public BehaviorTreePolicy
{
public:
    explicit BehaviorTreeWhileDoPolicy(const std::string &name);
    ~BehaviorTreeWhileDoPolicy() override;

    /**
     * @brief:  设置循环条件判断
     * @author: sherlock_lht
     */
    bool setWhileConditionTask(const task::AbstractTaskConstPtr &task);
    bool setWhileConditionPolicy(const AbstractPolicyConstPtr &policy);

    /**
     * @brief:  设置循环条件判断
     * @author: sherlock_lht
     */
    bool setExecuteTask(const task::AbstractTaskConstPtr &task);
    bool setExecutePolicy(const AbstractPolicyConstPtr &policy);

    /**
     * @brief:  设置执行体结束条件，如果不设置，则默认执行体不会导致策略结束
     * @author: sherlock_lht
     */
    void setEndCondition(task::TaskStatus status);
};

}


#endif //BEHAVIOR_TREE_WHILE_DO_POLICY_H
